import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpDailyPerception {
  id!: number;
  dId!: number;
  userId!: number;
  time?: string;
  content?: unknown;
  shareNum: number = 0;
  state!: boolean;
  uniacid!: number;
}

export const ImsYzdKpDailyPerceptionSchema = new EntitySchema({
  class: ImsYzdKpDailyPerception,
  properties: {
    id: { primary: true, type: 'number' },
    dId: { type: 'number' },
    userId: { type: 'number' },
    time: { type: 'string', length: 255, nullable: true },
    content: { type: 'unknown', columnType: 'longtext', nullable: true },
    shareNum: { type: 'number', default: 0 },
    state: { type: 'boolean' },
    uniacid: { type: 'number' },
  },
});
